package com.example.demo.order.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @ClassName Order
 * @Description
 * @Author MingChang.Wei
 * @Date 2025/8/8
 **/
@Data
@TableName("t_order")
public class Order implements Serializable {
    @TableId(type = IdType.AUTO)
    private Long id;
    private String orderNo;
    /** 用户名(逻辑关联sys_user.username) */
    private String username;
    private Long productId;
    private String productName;
    private Integer quantity;
    private BigDecimal price;
    private BigDecimal totalAmount;
    private Integer status; // 参考OrderStatusEnum
    private LocalDateTime createTime;
    private LocalDateTime payTime;
    private LocalDateTime refundTime;
}
